package com.label.Model.Do;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@TableName("template")
@Data
public class Template {

    @TableId(value = "template_id",type = IdType.ASSIGN_UUID)
    private String templateId;

    @TableField("template_name")
    private String name;

    @TableField("template_class")
    private String classId;

    @TableField("template_content")
    private String content;

    @TableField("template_creater")
    private String creater;

    @TableField("template_monitor")
    private String monitor;

    @TableField(value = "template_create_time",fill = FieldFill.INSERT)
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "template_update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date updateTime;

    public Template(){}

    public Template(String name,String classId,String content,String creater,String monitor){
        this.monitor=monitor;
        this.classId=classId;
        this.name=name;
        this.creater=creater;
        this.content=content;
    }
}
